package com.dubbo.study.echo;

import com.dubbo.study.echo.api.EchoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @program: dubbostudy
 *
 * @description:
 *
 * @author: heqiang
 *
 * @create: 2019-10-18 15:36
 **/
public class EchoConsumer {

    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                new String[]{"spring/echo-consumer.xml"});
        context.start();
        EchoService echoService = (EchoService) context.getBean("echoService");
        String message = echoService.echo("hello world");
        System.out.println("result:"+message);
    }
}
